/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.assignment2.testall;

import za.ac.cput.assignment2.LoanInterest;
import za.ac.cput.assignment2.smallbusiness.SmallBusiness;
import za.ac.cput.assignment2.student.postgrad.PostGrad;
import za.ac.cput.assignment2.student.undergrad.UnderGrad;

/**
 *
 * @author yandiswa
 */
public class Encapsulation {
    private static LoanInterest PostGrad;
    private static LoanInterest UnderGrad;
    private static LoanInterest SmallBusiness;
    public static void main(String []args)
    {
        /*LoanInterest lon[] = new LoanInterest[3];
         lon[0] = PostGrad;
         lon[1] = UnderGrad;
         lon[2] = SmallBusiness;
         for(int i= 0;i<lon.length;i++ )
        System.out.printf("Bank detail: %S %s %.2f",i,lon[i].getClass().getName());*/
         SmallBusiness bus = new SmallBusiness();
         System.out.println("Business details\n");
        bus.setLoanAmount(50);
        bus.setName("Mphokazi");
        bus.setRegNum("2051");
        System.out.println(bus.toString()+"\n");
        System.out.println("PostGrad details\n");
        
        PostGrad post = new PostGrad("YANDISWA","259867",25);
        System.out.println(post.toString()+"\n");
        System.out.println("UnderGrad  details\n");
        
        UnderGrad under = new UnderGrad("Poignancy","209060",85);
        System.out.println(under.toString());
        //System.out.printf();
        //System.out.println(lon3.getClass().toString());
        
    }
    
}
